package com.android.RssReader.Utils;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import com.android.RssReader.RssReaderApplication;

public class Helper {
	public  static boolean isOnline() {
		try {
			ConnectivityManager cm = (ConnectivityManager) RssReaderApplication.getInstance().getSystemService(Context.CONNECTIVITY_SERVICE);
			NetworkInfo ni = cm.getActiveNetworkInfo();
			return ni != null ? ni.isConnectedOrConnecting() : false;
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}
	
}
